package com.go10.catalog.service;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.go10.catalog.mapper.CatalogMapper;
import com.go10.catalog.pojo.Catalog;

@Service
public class CatalogServiceImpl implements CatalogService {
	
	
   private static final Logger logger=LoggerFactory.getLogger(CatalogServiceImpl.class);
	@Autowired
	private CatalogMapper mapper;
	
	@Override
	public List<Catalog> getByPid(Long pid) {

	 try {
		return mapper.selectBypid(pid);
	} catch (Exception e) {
		
		logger.error("get catalof by pid ="+pid,e);
		throw e;//直接返回到 上一层 
	}
	}

	@Override
	public void add(Catalog catalog) {
		// TODO Auto-generated method stub

	}

	@Override
	public void update(Catalog catalog) {
		

	}

}
